Posts by V453000

Friday Facts #305 - The Oil Changes

Posted by Rseding, V453000 on 2019-07-26

Lua Mod GUI additions Rseding Mod GUIs have been an interesting part of Factorio modding since I started working at Wube. They allow scenarios and mods to add GUIs that look and feel like the base game. When someone new to Factorio modding is introduced to how they function, they almost always have the same questions: Why is mod GUI part of the game state? Why do mod GUIs need to be deterministic? How can I edit the base game GUIs? And then comes the explanation: The actual widgets are not part of the game state and are not deterministic. The part that mods have access to however is. In an environment where mods have to operate deterministically, if a mod is allowed to read some data that data must be deterministic. In that simple bit of logic; if a mod can read the checked state of a checkbox then that checked state needs to be deterministic. If the mod didn't have access to read that state it would need to store the last-known state and update it every time it got the changed event. Try to imagine that: every single mod implementing their own system for remembering last-known-state about GUIs they're using. Instead of leaving that entire mess to mod developers we decided long ago that we would manage that "last-known-state" for them. The basic data about what a given mod wanted to show on screen is recorded so mods can read and change it as they want and not need to be concerned with constantly updating it every time some changed event happens. Additionally it means that the game can use that "last known state" to restore what the player sees if they save, quit, and load the game. That still leaves the last question: "How can I edit the base game GUIs?". Using the above example it's much easier to explain that: as a mod - you can't. The base game GUIs are not implemented using this same system - they're just pure collections of widgets. None of the "last known state" is saved anywhere and it's all lost when saving, quitting, and loading. However, that leaves a divide: we need to implement each widget type through the "CustomGui" system in order for mods to be able to use them. With this latest release I finally figured out a way to do tabbed panes since they're special in how they work compared to everything else. Additionally I figured out a semi-friendly way for mods to put things directly on the screen in a way that the player can drag them around - instead of being limited to some fixed area (left, top, center, etc). Another system which I've been thinking about for quite some time is some way for mods to position GUI elements relative to base game GUIs. For example: a mod wants to add a pane which shows on the left of the character inventory GUI. Currently it's not possible - the base game GUI isn't readable by mods so they can't do anything with it. My idea is some system where a mod can say "I want to add this GUI, and I want it to be shown relative to the character GUI on the left side" and then any time the character GUI is shown it would also show the mod GUI. There are some critical parts to this new system. It needs to: Be easy to expand (either automatically works with all new base game GUIs or works with minimal effort). Not break with simple refactoring. Not cause other programmers trouble by existing. Not prevent base game GUIs from working how they need to work. So far none of it seems impossible. I don't know when I'll have it working, but I'm looking forward to what mods will do with it.

Friday Facts #304 - Small bugs; Big changes

Posted by Klonan, Sanqui, V453000, Posila, Twinsen on 2019-07-19

Hello, We are down to 28 bugs on the forum. The last bugs are often the ones we have been putting off for a reason, they generally require some more meaningful changes and decisions. That is why this week we have a lot to discuss.

Friday Facts #301 - Crash site: First state

Posted by Ernestas, V453000, Albert, Rseding on 2019-06-28

Crash site: First state Ernestas, V453000, Albert For many weeks now the GFX department has been focused on preparing replacements for the placeholder graphics of the campaign crash site. The subject as usual is not that easy because we had to first solve the main concept of the crash site. It happens that those new entities belong to the Factorio universe, but they come from a different reality than the usual DIY/diesel punk of the game. So we had to invent a new way to design machines that look like Factorio but that are not too familiar. Here a proof of concept of the look: The concept is that the big (medium) spaceship broke into pieces as it crash landed, and lost many components that the player, during the introduction, will repair and use for his own profit. The look of the spaceship remnants are a little bit based on the designs of the 60’s/70’s pulp Sci-Fi. Fortunately we can keep the look of Factorio due the accident, which allows us to destroy and dirty up the machines show many inner mechanical details. It is also part of the concept that all the machines that the player builds, are based on an existing technology from his home planet. So the machines that we see in the regular game are like 'cheap' versions of the original ones. For the lab, we keep the dome shape and the beams inside in order to keep consistency with the regular laboratory. So slowly the player gets used to the meaning of the shapes. The generator is similar to a substation -more or less-, connectable like a pole but it also produces electricity. Sometimes we really have to invent. This works like an assembling machine. The design is more based in the (yet unshown) redesign of the assembling machines, rather than on the actual 'classic' ones. These cylinders are like chests. We decided to make them cylindrical instead of a box for this difference in technology level that we are speaking about. The player will recognize them for the shape, color, and they also always have a number printed. You don’t really want to know the meaning of the numbers. All this new content is a work in progress, and we made these new entities first for the testing of the campaign. Based on feedback with testers we will have the chance to tweak and adapt whatever is necessary. In the case of the introduction, the positioning of the entities can have a large impact on the flow of the gameplay. Once we are more sure of the final placement, we can see how all the pieces will fit together. The next round for the crash site is the main crashed spaceship, and some other assets that converts the scene into a full composition, more proper for the introduction of the game.

Friday Facts #297 - New resource icons

Posted by Twinsen, v453000 on 2019-05-31

Inserters are now smarter Twinsen A few days ago I was investigating a rather minor bug report related to "Rotational Asymmetry in Belt/Inserter interactions" (aka Inserter was not behaving identically when rotated). This was a classic case of floating point equality comparison. The Inserter would move it's arm and then it would pick up the item if the current arm orientation is equal to the desired arm orientation. Because of some chain of calculations related to rotation, some precision was lost and the equality check would fail for 1 tick, delaying the item pickup for 1 tick in some Inserter rotations. So I fixed that by finishing the inserter movement if it's close enough. Now the inserters should be a tiny bit faster in some rotations, plus all rotations should again be symmetrical and identical. While analyzing the code and Inserter behavior for that bug, I also noticed that inserters with stack bonus would do nothing for 1 tick after picking up an item from a belt. I changed it so inserters will start moving to a new target immediately after they pick up something. This also sped up the Stack Inserter by a tiny bit. Both the speedups were enough to fix another bug that was often regarded by the other devs as "not a bug": A Stack Inserter was not fast enough to pick up all the items placed on a belt by another Stack Inserter. Furthermore, because of different timings, the amount of items a Stack Inserter would pick up would depend on how far that Stack Inserter was from the item source: We released the change on Thursday. Something strange was quickly discovered after release... From Nefrums speedrun stream. As someone from Twitch chat noted "Inserters are so fast now, they even don't care about the side of belt". Remember that I fixed the rotation problem by finishing the Inserter movement if it's close enough. Well, what ended up happening was what now the Inserter would stop 0.0001 degrees short of perfectly vertical. That was of course closer to the other belt lane so the item would be dropped there. Previously it was always dropped perfectly vertical, and the lane decision algorithm would choose the right lane. The fix was easy and it's probably released by the time you are reading this. So with everything fixed, inserters are now more consistent, predictable and intuitive, things that I think are important for a precise game like Factorio. Some situation might end up being slightly slower or will consume a bit more electricity, but generally inserters are now faster.

Friday Facts #283 - Prepare to Launch

Posted by kovarex, Albert, V453000, Bilka, Sanqui on 2019-02-22

Playtesting kovarex We have been playtesting a few days this week. There were some things we had to fix on the fly, but we still were able to play quite a lot, so I would say that it went surprisingly well. We have been able to get 3 multiplayer bases into a late game stage.

Friday Facts #275 - 0.17 Science changes

Posted by V453000 & Albert on 2018-12-28

It's the last Friday of 2018, and as such the last Friday Facts before the New year of 2019. We all hope everyone has had a great 2018, and looking forward to a lot more automation fun to come in 2019. Albert has produced a postcard for you all to share to give the year a good send-off.

Friday Facts #269 - Roadmap update & Transport belt perspective

Posted by kovarex & V453000 on 2018-11-16

Roadmap update (kovarex) A lot of people have been asking recently, when can they expect a new release and when is the game going to be finished. The original plan was to finish everything, and release the final version of Factorio ideally before the end of 2018. This was the plan at the beginning of the year. We worked in our usual way of "it is done when it is done" for quite some time, but then it started taking a little bit too long, and we weren't even sure what is a realistic timeframe to finish it in. To help this issue, we tried to become a little more organized in the past few weeks. We went through our list of all the development tasks, and tried to finalize it. We removed all the things that we decided to cut, and added all the missing things that we need to do before the game is finished. Then we tried to make some kind of time estimate for each task, to get a general idea of when everything will be finished. We started to be more conscious of who is working on what, and how much time each task is taking, to know how accurate the estimates are. The result was, that if it all goes well, we could be done in 6-9 months. This is probably not something you wanted to hear. After a few rounds of discussions, we decided split the releases of 0.17 and 0.18 in the following way: 0.17 plan It will contain all the things we have done up to this point, mainly: New render backend, which helps performance and solves a lot of issues (FFF-251) The graphical updates: walls, gates, turrets, belts, biters, spawners, electric poles (FFF-268, FFF-228, FFF-253) The GUI reskin (FFF-243) New map editor (FFF-252) Resource generation overhaul (FFF-258) Robot construction tools (FFF-255) Rich text (FFF-237, FFF-267) And more... It will also include some things we know we can finish soon enough, mainly: Redoing some of the most important GUIs (Action bar, character screen, main game GUI, train GUI, play GUI, tooltips) Fluid optimisations And several smaller things, which depends on how it goes We will release this during January 2019, we will announce it more precisely in advance. 0.18 plan It will become the final 1.0 version once it is stable. It will contain mainly: New tutorial New campaign Final mini tutorials Revision of rest of the GUI All remaining high res graphics graphics and final polish We obviously don't know exactly when is it going to be ready, but we hope it to be sooner than 9 months from now.

Friday Facts #257 - NPE/Campaign update

Posted by V453000 on 2018-08-24

With most of the team away for Gamescom or vacation, I have the pleasure of writing a Friday Facts for you this week.

Friday Facts #245 - Campaign concept

Posted by V453000 & Abregado on 2018-06-01

Being brought in to create content on a very mature project has been an interesting experience to say the least. One of the first things I did was analyse the features of the game and which kind of player the game currently supports. The obvious thing is that Factorio Freeplay strongly attracts and engages players who enjoy an open-ended sandbox type of game. Achievement statistics show that only about 11% of players on Steam have ever launched a rocket, which currently means 'won the game'. What about the other player types? Well for those that are new to the game, or unsure if they are interested, we will have the New Player Experience. This is a free, combined tutorial and demonstrator mission which we discussed in FFF-241. But what about those that prefer a guided experience? This is the sort of player who wants to play the game, and experience all of what it has to offer, but wants to be taken on a journey. For these players we have the campaign. Why do we need a new campaign at all? We find that the current campaign: Does not include all the Freeplay content as it currently ends after Advanced Circuits. Severely limits player investment by forcing a new factory to be built each mission. Does not convey the feeling of loneliness that the Freeplay does. Is showing its age visually, as it was made before high-res textures and the terrain rework. To solve these issues we have set about designing new Campaign elements to act consistently to provide the player with a guided experience all the way from Science pack 1 to Space science packs. The first step to achieving this is to have the map border expand each time the player completes a section of the main 'quest line'. This means that the player never loses any of their progress, and as long as these transitions are presented in a smooth way, the jarring effect of the old level restarts will be removed. Having a continuously expanding map presents many other challenges, but we are confident that it will be worthwhile. This style of level will fit with the style of Factorio much better. Such a map should also end up being as huge as a regular Freeplay environment so as to better place importance on exploration. Exploration in Freeplay is generally player motivated, such as when you are almost out of iron and need to find that next big patch. In a guided experience, letting the player know that there is something out there can give them impetus to dive into the unknown. This brings us to technologies. Now that we have removed level transitions, we have also shot ourselves in the foot. How else will we deliver the technology tree in chunks? Simply making the entire tree available from the start of the game will cause all sorts of balance issues. In our NPE discussion we stated that new recipes should only be given to the player via research. In the campaign, unresearched technologies will only be given by moving to given locations on the map. These would include some non-generated terrain and pre-placed factory structures to help to player see where they are. These could also help to show concepts and workable designs, one thing that the current campaign does do well.